﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SystemCenterSoa.PoModel.SystemManager;
using SystemCenterSoa.Service.SystemManager;

namespace SystemCenterSoa.ApiProject.Area.SystemManager
{
    public class ArchitecturalTitleController : SystemManagerBaseController
    {
        private ArchitecturalTitleService _architecturalTitleService;
        public ArchitecturalTitleController(ArchitecturalTitleService architecturalTitleService)
        {
            _architecturalTitleService = architecturalTitleService;
        }
        /// <summary>
        /// 分页条件查询
        /// </summary>
        /// <param name="atleName"></param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetArchitecturalTitleList(string atleName)
        {
            try
            {
                var list = _architecturalTitleService.GetArchitecturalTitleList(atleName);
                return Ok(new { list });
            }
            catch (Exception)
            {
                throw;
            }
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="ArchitecturalTitle"></param>
        /// <returns></returns>
        [HttpPost]
        public bool GetArchitecturalTitleAdd(ArchitecturalTitlePo ArchitecturalTitle)
        {
            return _architecturalTitleService.GetArchitecturalTitleAdd(ArchitecturalTitle);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        [HttpPost]
        public bool GetArchitecturalTitleDel(string ids)
        {
            return _architecturalTitleService.GetArchitecturalTitleDel(ids);
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [HttpGet]
        public ArchitecturalTitlePo GetArchitecturalTitleFan(int id)
        {
            return _architecturalTitleService.GetArchitecturalTitleFan(id);
        }
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="ArchitecturalTitle"></param>
        /// <returns></returns>
        [HttpPost]
        public bool GetArchitecturalTitleUpdate(ArchitecturalTitlePo ArchitecturalTitle)
        {
            return _architecturalTitleService.GetArchitecturalTitleUpdate(ArchitecturalTitle);
        }
    }
}
